Teach fsck about partial commits
authorColin Walters <walters@verbum.org>
Mon, 6 Apr 2015 18:19:08 +0000 (14:19 -0400)
committerColin Walters <walters@verbum.org>
Wed, 6 May 2015 12:07:20 +0000 (08:07 -0400)
commit5becd5ccad47fff009c1578fc870ffad66b940af
treeaba09b96bfdb0cfed877654dd09c359a39d12a3c
parent279308b5b95b587a306ab0841ebdd1b7ae4880e0
Teach fsck about partial commits

An OSTree user noticed that `ostree fsck` would produce `missing
object` errors in the case of interrupted pulls.

It's possible to do e.g. `ostree pull --subpath=/usr/share/rpm ...`,
which gets you just that portion of the commit.  The use case for this
was being able to see what changes would appear in an update before
actually downloading all of it.

(I think this would be better covered by static deltas, but those
 aren't final yet, and `--subpath` predates it)

Further, `.commitpartial` is used as a successor to the `transaction`
symlink for more precise knowledge in the case where a pull was
interrupted that we needed to resume scanning.

So it makes sense for `ostree fsck` to be aware of it.
Makefile-tests.am
doc/ostree-sections.txt
src/libostree/ostree-cmdprivate.c
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h
src/libotutil/ot-fs-utils.c
src/libotutil/ot-fs-utils.h
src/ostree/ot-builtin-fsck.c
tests/test-oldstyle-partial.sh [new file with mode: 0644]